/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package functionroots.samples;

import functionroots.primitives.RealFunction;

/**
 *
 * @author orion
 */
public class Function23 implements RealFunction{

    public double value(double x) {
        return x * x * x + Math.log(x) + 2 - (Math.exp(x/2) + x);
    }

    public double derivative(double x) {
        return 3 * x * x + 1/x - Math.exp(x/2)/2 + 1;
    }

    public String text(double x) {
        return "x^3 + log(x) + 2 - (exp(x/2) + x)";
    }
}